package com.heima.wemedia.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmNewDto;
import com.heima.model.wemedia.dtos.WmNewsDto;
import com.heima.model.wemedia.dtos.WmNewsPageReqDto;
import com.heima.model.wemedia.pojos.WmNews;

import java.util.List;

/**
 * Package: com.heima.wemedia.service
 * ClassName: WmNewsService
 * Description:
 *
 * @Author : 福森森
 * @Create : 2024/8/27 15:10
 */
public interface WmNewsService extends IService<WmNews> {

    /**
     * 查询文章
     */
    ResponseResult<List<WmNews>> findAll(WmNewsPageReqDto dto);

    /**
     *  发布文章或保存草稿
     * @param dto
     * @return
     */
    public ResponseResult submitNews(WmNewsDto dto);

    ResponseResult<WmNews> findOne(Long id);

    ResponseResult<Void> delNews(Long id);

    ResponseResult<Void> downOrUp(WmNewDto dto);
}
